#ifndef unigame_XmlTab_h
#define unigame_XmlTab_h

#include <vector>
#include "config/Def.h"

namespace unixml
{
    class XmlTab
    {
    public:
        XmlTab(uint16* code, int32 strat);
        ~XmlTab();
        
        uint16* getName()
        {
            return m_name;
        }
        
        int getEnd()
        {
            return m_end;
        }
        
        uint16* getAttribute(const uint16* name);
        
    private:
        void init();
        void makeAttribute(int32 start);
        
    private:
        uint16* m_code;
        uint16* m_name;
        int32 m_start;
        int32 m_end;
        
        std::vector<uint16*> m_attributeNames;
        std::vector<uint16*> m_attributeValues;
    };
}
#endif /* defined(__unigame__XmlTab__) */
